﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;

namespace NetDon.OA.Interface.Admin
{
    /// <summary>
    /// 
    /// </summary>
    public interface IUserService
    {
        bool AddUser(UserData userData);

        UserData GetUser(Guid userId);

        UserData GetUserByLoginName(string strLoginName);

        int GetUserCount(UserSearchCriteria criteria);

        DataTable SearchUsers(UserSearchCriteria criteria,
                                         string sortExpression, SortDirection sortDirection, int pageSize, int pageIndex);

        List<UserData> SearchUsersByCondition(UserSearchCriteria criteria,
                                       string sortExpression, SortDirection sortDirection, int pageSize, int pageIndex);

        string GetUserEmail(Guid userId);

        UserData GetUserByLoginName(string strLoginName, string strLoginEmail);

        bool ChangeStatus(Guid userId, UserStatus status);
        bool ModifyUser(UserData user);

        bool ValidateUserReferenced(Guid userId);
        void RemoveUser(Guid userId);


        //bool HasPermission(Guid currentUserId, Guid entityUserId);
    }
}
